/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package orderProcessingProcess.util;

import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 *
 * @author dreni
 */
public class MyCustomDateAdapter extends XmlAdapter<Long, Date>{

    @Override
    public Date unmarshal(Long l) throws Exception {
        return new Date(l);
    }

    @Override
    public Long marshal(Date date) throws Exception {
        return date.getTime();
    }

}
